package cn.com.biz;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.com.dao.LiuYanDao;
import cn.com.entity.LiuYan;

public class LiuYanBiz {
	private LiuYanDao liuyanDao;

	public LiuYanDao getLiuyanDao() {
		return liuyanDao;
	}

	public void setLiuyanDao(LiuYanDao liuyanDao) {
		this.liuyanDao = liuyanDao;
	}
	public List<LiuYan> getall(){
		ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
		liuyanDao=(LiuYanDao)ctx.getBean("liuyanDao");
		List<LiuYan> liuyanlist=liuyanDao.getall();
		return liuyanlist;
	}
	public boolean insertliuyan(LiuYan liuyan){
		boolean b=liuyanDao.insertliuyan(liuyan);
		return b;
	}
}
